package io.jft.doll.room.entity.common

import android.arch.persistence.room.Entity
import android.arch.persistence.room.PrimaryKey
import android.arch.persistence.room.TypeConverters
import com.google.gson.annotations.SerializedName
import io.jft.doll.room.typeConverters.RoomRtmpConverters
import io.jft.doll.room.typeConverters.RoomUdpConverters


/**
 * Created by G on 2017/11/29 0029.
 */
/**
 * 房间列表
 */
@Entity
@TypeConverters(RoomUdpConverters::class, RoomRtmpConverters::class)
data class RoomCEntity(
        @PrimaryKey @SerializedName("id") var id: String = "",
        @SerializedName("img") var img: String = "",
        @SerializedName("thumbnail") var thumbnail: String = "",
        @SerializedName("title") var title: String = "",
        @SerializedName("qunued") var queued: Int = 0,
        @SerializedName("paying") var paying: String = "-",
        @SerializedName("status") var status: Int = 0,
        @SerializedName("rtmp") var rtmp: RtmpREntity = RtmpREntity(),
        @SerializedName("udp") var udp: UdpREntity = UdpREntity(),
        @SerializedName("gameTime") var gameTime: Int = 30,
        var groupId: String = "",
        var isAppointment: Boolean = false,
        var normalQueued: Int = 0
)

data class RtmpREntity(
        @SerializedName("address2") var address2: String = "",
        @SerializedName("address1") var address1: String = ""
)

data class UdpREntity(
        @SerializedName("address2") var address2: String = "",
        @SerializedName("address1") var address1: String = "",
        @SerializedName("port1") var port1: Int = 0,
        @SerializedName("port2") var port2: Int = 0
)